const path = require("path");
import typescript from "rollup-plugin-typescript";
import sourceMaps from "rollup-plugin-sourcemaps";
export default {
  input: path.resolve(
    __dirname,
    "src/platforms/web/entry-runtime-with-compiler.ts"
  ),
  output: [
    {
      file: path.resolve(__dirname, "dist", "vue.js"),
      format: "umd",
      name: "Vue",
      sourcemap: true,
    },
    {
      format: "cjs",
      file: "dist/vue.bundle.cjs.js",
      sourcemap: true,
    },
    {
      format: "es",
      file: "dist/vue.bundle.esm.js",
      sourcemap: true,
    },
  ],
  plugins: [
    typescript({
      exclude: "node_modules/**",
      typescript: require("typescript"),
    }),
    sourceMaps(),
  ],
  globals: {
    Vue: "Vue",
  },
  watch: {
    include: "src/**",
  },
};
